package 最长数字子串;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next(), ans = "";
        int n = s.length();
        int i = 0, j = 0;
        int res = 0;
        while (i < n && j < n) {
            if (s.charAt(i) >= '0' && s.charAt(i) <= '9') {
                j = i + 1;
                while (j < n && s.charAt(j) >= '0' && s.charAt(j) <= '9') {
                    j++;
                }
                if (res < j - i) {
                    ans = s.substring(i, j);
                    res = j - i;
                }
                i = j;
            } else {
                i++;
            }
        }
        System.out.println(ans);
    }
}
